# > source("C:\\Projects\\scala-agent3\\R\\animElectricFieldMove.R")


x <- 3
y <- 5
xs <- numeric(0)
ys <- numeric(0)
phys <- numeric(0)
for( i in 1:200 ){
 plot(1:10,1:10, type="n") 
 points(xs, ys, pch=".")
 points(x,y, col="red")
 if( i>100 ){
   x <- x + 0.08
 }
 for( phi in 1:15 / 15 * 2 * pi ){
   xs <- c(xs,x)
   ys <- c(ys,y)
   phys <- c(phys,phi)
 }
 xs <- xs + cos(phys)*0.1
 ys <- ys + sin(phys)*0.1
 Sys.sleep(time=0.1)
}
